package com.ek.distmpl.dao.mapper;

import com.ek.distmpl.dao.model.Comment;
import com.ek.distmpl.dao.model.CommentExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface CommentMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=CommentSqlProvider.class, method="countByExample")
    long countByExample(CommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @DeleteProvider(type=CommentSqlProvider.class, method="deleteByExample")
    int deleteByExample(CommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Delete({
        "delete from comment",
        "where course_record_id = #{courseRecordId,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(String courseRecordId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Insert({
        "insert into comment (course_record_id, course_record_sid, ",
        "course_record_uid, course_begin_time, ",
        "course_end_time, course_record_for_shop_star, ",
        "course_record_for_coach_star, course_record_for_course_star, ",
        "course_record_time, course_record_status, ",
        "course_record_comment)",
        "values (#{courseRecordId,jdbcType=CHAR}, #{courseRecordSid,jdbcType=CHAR}, ",
        "#{courseRecordUid,jdbcType=CHAR}, #{courseBeginTime,jdbcType=VARCHAR}, ",
        "#{courseEndTime,jdbcType=VARCHAR}, #{courseRecordForShopStar,jdbcType=INTEGER}, ",
        "#{courseRecordForCoachStar,jdbcType=INTEGER}, #{courseRecordForCourseStar,jdbcType=INTEGER}, ",
        "#{courseRecordTime,jdbcType=VARCHAR}, #{courseRecordStatus,jdbcType=INTEGER}, ",
        "#{courseRecordComment,jdbcType=LONGVARCHAR})"
    })
    int insert(Comment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @InsertProvider(type=CommentSqlProvider.class, method="insertSelective")
    int insertSelective(Comment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=CommentSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="course_record_id", property="courseRecordId", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="course_record_sid", property="courseRecordSid", jdbcType=JdbcType.CHAR),
        @Result(column="course_record_uid", property="courseRecordUid", jdbcType=JdbcType.CHAR),
        @Result(column="course_begin_time", property="courseBeginTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_end_time", property="courseEndTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_record_for_shop_star", property="courseRecordForShopStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_for_coach_star", property="courseRecordForCoachStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_for_course_star", property="courseRecordForCourseStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_time", property="courseRecordTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_record_status", property="courseRecordStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_comment", property="courseRecordComment", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<Comment> selectByExampleWithBLOBs(CommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=CommentSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="course_record_id", property="courseRecordId", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="course_record_sid", property="courseRecordSid", jdbcType=JdbcType.CHAR),
        @Result(column="course_record_uid", property="courseRecordUid", jdbcType=JdbcType.CHAR),
        @Result(column="course_begin_time", property="courseBeginTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_end_time", property="courseEndTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_record_for_shop_star", property="courseRecordForShopStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_for_coach_star", property="courseRecordForCoachStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_for_course_star", property="courseRecordForCourseStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_time", property="courseRecordTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_record_status", property="courseRecordStatus", jdbcType=JdbcType.INTEGER)
    })
    List<Comment> selectByExample(CommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Select({
        "select",
        "course_record_id, course_record_sid, course_record_uid, course_begin_time, course_end_time, ",
        "course_record_for_shop_star, course_record_for_coach_star, course_record_for_course_star, ",
        "course_record_time, course_record_status, course_record_comment",
        "from comment",
        "where course_record_id = #{courseRecordId,jdbcType=CHAR}"
    })
    @Results({
        @Result(column="course_record_id", property="courseRecordId", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="course_record_sid", property="courseRecordSid", jdbcType=JdbcType.CHAR),
        @Result(column="course_record_uid", property="courseRecordUid", jdbcType=JdbcType.CHAR),
        @Result(column="course_begin_time", property="courseBeginTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_end_time", property="courseEndTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_record_for_shop_star", property="courseRecordForShopStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_for_coach_star", property="courseRecordForCoachStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_for_course_star", property="courseRecordForCourseStar", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_time", property="courseRecordTime", jdbcType=JdbcType.VARCHAR),
        @Result(column="course_record_status", property="courseRecordStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="course_record_comment", property="courseRecordComment", jdbcType=JdbcType.LONGVARCHAR)
    })
    Comment selectByPrimaryKey(String courseRecordId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=CommentSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Comment record, @Param("example") CommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=CommentSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") Comment record, @Param("example") CommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=CommentSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Comment record, @Param("example") CommentExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=CommentSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Comment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update comment",
        "set course_record_sid = #{courseRecordSid,jdbcType=CHAR},",
          "course_record_uid = #{courseRecordUid,jdbcType=CHAR},",
          "course_begin_time = #{courseBeginTime,jdbcType=VARCHAR},",
          "course_end_time = #{courseEndTime,jdbcType=VARCHAR},",
          "course_record_for_shop_star = #{courseRecordForShopStar,jdbcType=INTEGER},",
          "course_record_for_coach_star = #{courseRecordForCoachStar,jdbcType=INTEGER},",
          "course_record_for_course_star = #{courseRecordForCourseStar,jdbcType=INTEGER},",
          "course_record_time = #{courseRecordTime,jdbcType=VARCHAR},",
          "course_record_status = #{courseRecordStatus,jdbcType=INTEGER},",
          "course_record_comment = #{courseRecordComment,jdbcType=LONGVARCHAR}",
        "where course_record_id = #{courseRecordId,jdbcType=CHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(Comment record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table comment
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update comment",
        "set course_record_sid = #{courseRecordSid,jdbcType=CHAR},",
          "course_record_uid = #{courseRecordUid,jdbcType=CHAR},",
          "course_begin_time = #{courseBeginTime,jdbcType=VARCHAR},",
          "course_end_time = #{courseEndTime,jdbcType=VARCHAR},",
          "course_record_for_shop_star = #{courseRecordForShopStar,jdbcType=INTEGER},",
          "course_record_for_coach_star = #{courseRecordForCoachStar,jdbcType=INTEGER},",
          "course_record_for_course_star = #{courseRecordForCourseStar,jdbcType=INTEGER},",
          "course_record_time = #{courseRecordTime,jdbcType=VARCHAR},",
          "course_record_status = #{courseRecordStatus,jdbcType=INTEGER}",
        "where course_record_id = #{courseRecordId,jdbcType=CHAR}"
    })
    int updateByPrimaryKey(Comment record);
}